# 2007-07-23 Stepan Kasal &lt;skasal@redhat.com&gt;
# - fix for gcc4, use "ax_cv_" prefix, avoid obsolete AC_TRY_COMPILE

AC_DEFUN([AX_C___ATTRIBUTE__], [
  AC_CACHE_CHECK([for __attribute__], [ax_cv___attribute__],
    [AC_COMPILE_IFELSE(
      [AC_LANG_SOURCE([static int foo(void) __attribute__((const));static int foo(void) {return 0;} int main() {return foo();}])],
      [ax_cv___attribute__=yes], [ax_cv___attribute__=no]
    )
  ])
  if test "$ax_cv___attribute__" = "yes"; then
    AC_DEFINE([HAVE___ATTRIBUTE__], 1, [define if your compiler has __attribute__])
  fi
])
